import request from '@/uilts/request'
// 区域列表
export const RegionalListRequest = (params) => {
  return request({
    url: '/api/vm-service/region/search',
    params
  })
}
// 新增区域
export const AddRegionalRequest = (data) => {
  return request({
    url: '/api/vm-service/region',
    method: 'POST',
    data
  })
}
// 修改区域
export const ModifyRegionalRequest = (data) => {
  return request({
    url: `/api/vm-service/region/${data.id}`,
    method: 'PUT',
    data
  })
}
// 区域详情
export const MsgRegionalRequest = ({ regionId, pageIndex, pageSize, name }) => {
  return request({
    url: '/api/vm-service/node/search',
    params: {
      pageIndex,
      pageSize,
      name,
      regionId
    }
  })
}
// 点位管理
// 商圈列表
export const BusinessCircleListRequest = () => {
  return request({
    url: '/api/vm-service/businessType'
  })
}
// 合作商搜索
export const PartnersListRequest = ({ pageIndex, pageSize, name }) => {
  return request({
    url: '/api/user-service/partner/search',
    params: {
      pageIndex,
      pageSize,
      name
    }
  })
}
// 新增点位
export const NewPointListRequest = (data) => {
  return request({
    url: '/api/vm-service/node',
    method: 'POST',
    data
  })
}
// 点位详情
export const PointMsgListRequest = (id) => {
  return request({
    url: `/api/vm-service/node/vmList/${id}`
  })
}
// 点位修改
export const PointModifyListRequest = (data) => {
  return request({
    url: `/api/vm-service/node/${data.id}`,
    method: 'PUT',
    data
  })
}
// 合作商搜索
export const PartnerSearchRequest = (params) => {
  return request({
    url: '/api/user-service/partner/search',
    params
  })
}
// 新增合作商
export const AddPartnerRequest = (data) => {
  return request({
    url: '/api/user-service/partner',
    method: 'POST',
    data
  })
}
// 重置合作商密码
export const ResetPasswordRequest = (id) => {
  return request({
    url: `/api/user-service/partner/resetPwd/${id}`,
    method: 'PUT'
  })
}
// 修改合作商
export const ModifyPartnerRequest = (data) => {
  return request({
    url: `/api/user-service/partner/${data.id}`,
    method: 'PUT',
    data
  })
}
